<template>
  <MainLayout title="待办任务">
    <view class="section">
      <view v-if="!list.length" class="empty">暂无待办任务</view>
      <view v-for="t in list" :key="t.id" class="item">
        <view class="title">{{ t.title }}</view>
        <view class="meta">{{ t.project }} · 截止 {{ t.deadline }}</view>
      </view>
    </view>
  </MainLayout>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import MainLayout from '@/layouts/MainLayout.vue'
const list = ref<any[]>([])
onMounted(()=>{
  list.value = [
    { id: 1, title: '钢筋隐蔽验收记录', project: '示例项目A', deadline: '2025-08-20' },
    { id: 2, title: '混凝土浇筑检验记录', project: '示例项目B', deadline: '2025-08-22' }
  ]
})
</script>

<style scoped>
.section{ padding: 24rpx; }
.item{ background:#fff; padding: 24rpx; border-radius: 12rpx; margin-bottom: 16rpx; }
.title{ font-weight: 700; }
.meta{ color:#888; font-size: 24rpx; margin-top: 6rpx; }
.empty{ color:#888; text-align:center; margin-top: 200rpx; }
</style>
